package com.jial08.mybatisgenerator.generator;

import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl;

import java.sql.Timestamp;
import java.sql.Types;

/**
 * 自定义映射关系
 */
public class CustomJavaTypeResolverDefaultImpl extends JavaTypeResolverDefaultImpl {

	public CustomJavaTypeResolverDefaultImpl() {
		super();
		// 指定 timestamp 的 jdbcTypeName 和 JavaType
		super.typeMap.put(Types.TIMESTAMP, new JdbcTypeInformation("TIMESTAMP", new FullyQualifiedJavaType(Timestamp.class.getName())));
	}
}
